'use strict'

class huozan{
    constructor(){
           
        this.param = '/'
    }

    async get(c){
        let a = c.service.fun;
        c.setHeader('content-type', 'text/html; charset=utf-8');
        
        let {user_id} = c.query;
        let data = await a.sel('like_list',{'liked_user_id':`${user_id}`},['like_user_id'],c.service.pool);
        let num = data.rows.length;
        
        c.send({
            type:'number',
            data:num
        })
    }

}

module.exports = huozan
